import request from '@/utils/request'

// -----------------文章分类的内容-----------------
// 获取文章分类的内容
export const artGetChannelsService = () => request.get('/my/cate/list')

//更改文章分类的内容
export const artChangeChannelService = (obj) =>
  request.put('/my/cate/info', obj)

//增加文章分类的内容
export const artAddChannelService = (obj) => request.post('/my/cate/add', obj)

// 删除文章分类的内容
export const artDelChannelService = (id) =>
  request.delete('/my/cate/del', { params: { id } })

// -----------------文章管理的内容-----------------
// 获取文章列表
export const artGetMangeService = (params) =>
  request.get('/my/article/list', { params })

//发布文章按钮
export const AddArtMangeService = (params) => request.post('/my/article/add', params)

// 点击编辑菜单 获取用户的数据
export const GetMangerInfo = (id) =>  request.get('my/article/info', { params: { id } })


// 点击删除按钮可以删除文章
export const DelMangerArticel = (id) => request.delete('/my/article/info',{ params: { id } })


// 用户的编辑操作
export const artEditService = (data) => request.put('my/article/info', data)